In many software systems today, the existing or legacy graphical user interfaces (“GUIs”) are coded in C++ code. Over the past few years, however, Java® has become the programming language of choice. In order to use Java for providing the functionality of a system, the C++ GUIs must be made useable with Java. One alternative is to rewrite all of the lines of C++ code in Java. Rewriting the C++ code may comprise rewriting many lines of code. In many situations this is impractical. Furthermore, in many situations, it is desirable, practical, and cost-effective to maintain the C++ GUIs, instead of replacing them, and to use them to interface Java objects and methods of the Java functional code.
Accordingly, another alternative is to enable the C++ GUIs to make calls directly to the Java objects and methods in a Java Virtual Machine (“JVM”) in the Java environment. The Java objects and methods control the functions of the computer systems. In order for the C++ GUIs to make calls directly to the Java objects and methods in the JVM, the C++ GUIs must make Java Native Interface (“JNI”) Application Programming Interface (“API”) calls across the Java to legacy boundary, as conceptually shown in FIG. 1. Likewise, Java data types must be converted to C++ data type, and vice-versa.
A solution to this requirement comprises coding JNI APIs and data type conversions into each of the C++ GUIs as required. This is disadvantageous because it litters or clutters the legacy C++ GUIs with the JNI API and data type conversion coding, bloating the size of the C++ GUIs and causing future maintenance problems. Moreover, many of the JNI APIs are repetitious among the C++ GUIs. Therefore, coding the JNI APIs into each of the C++ GUIs is inefficient. Additionally, when the C++ code is converted to Java, the JNI APIs must be deleted, as they will be unnecessary when the former C++ GUIs are on the Java side of the JNI.